//
//  NetworkManager.h
//  HxgProject
//
//  Created by hxg on 2018/3/26.
//  Copyright © 2018年 XMYY-19. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "Singleton.h"

typedef NS_ENUM(NSUInteger, ParamtersJudgeCode) {
    
    RequestUrlNil          = 11,
    ParamtersObjectNil     = 12,
    UploadPictureDataNil   = 13,
    UploadPictureKeyNil    = 14,
    UploadFailed           = 15,
    RequestFailed          = 16, 
};

@interface NetworkManager : NSObject

singleton_interface(NetworkManager)


// GET请求
- (void)getURL:(NSString *)urlInfo parameters:(id)parameters success:(void (^)(id responseObject))successful
       failure:(void (^) (NSError *error, ParamtersJudgeCode  judgeCode))failure;

// POST请求
- (void)postURL:(NSString *)urlInfo parameters:(id)parameters
        success:(void (^)(id responseObject))successful
        failure:(void (^) (NSError *error, ParamtersJudgeCode  judgeCode))failure;

@end
